package com.finger.gulimall.order.feign;

import com.finger.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("gulimall-member")
public interface MemberRemoteService {

    /**
     * 根据会员id查找会员地址
     * @param id 会员id
     * @return
     */
    @RequestMapping("/member/memberreceiveaddress/findById/{id}")
    public R findAddrsById(@PathVariable Long id);

    /**
     * 计算运费
     * @param addrId
     * @return
     */
    @GetMapping("/member/memberreceiveaddress/addrFareForOrder")
    public R addrFare(@RequestParam("addrId")Long addrId);
}
